PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Problem creating new app

This is my first shot at creating my own GD app... I followed the directions to the letter on the GD site for re-creating the minimal app. I'm getting the following error during compilation:

--------------------Configuration: MyProject - Win32 Debug--------------------
Compiling...
GapiApplicationMT.cpp
C:\Source\GapiDraw\include\GapiApplicationMT.cpp(113) : error C2039: '_beginthreadex' : is not a member of '`global namespace''
C:\Source\GapiDraw\include\GapiApplicationMT.cpp(113) : error C2065: '_beginthreadex' : undeclared identifier
Error executing cl.exe.

MyProject.exe - 2 error(s), 0 warning(s)

I used the precise directory structure described there and even went so far as to call the application MyProject! No dice. I'm betting it's a simple fix, but I don't know what it is. Thanks all!
If I'm not misstaken this has to do with your project settings.

Since I don't have the development tools at work I can't tell you exactly where to look. But somewhere in the Project Settings there is a dropdown that you should switch to "multithread"-something.
Hi fzammetti,

Thanks for reporting. There is a slight misprint in the tutorial. It currently says:

ADDING THE CODE

Header Files. Right-click on the folder called "Header Files" and choose "Add Files to Folder...". Navigate to "C:\Source\GapiDraw\Include" and select all files."

It should have said:

Header Files. Right-click on the folder called "Header Files" and choose "Add Files to Folder...". Navigate to "C:\Source\GapiDraw\Include" and select the files "GapiDraw.h, GapiApplication.h, GapiApplication.cpp".

Sorry for the typo, I have updated the online document. Right now you can simply remove the files "GapiApplicationMT.cpp and GapiApplicationMT.h" from your project and it should compile nicely...

Please let me know if it works out ok.

Thanks
//Johan
Yep, removing the extra headers fixed the problem nicely, thank you!

I do however have another problem now... When trying to compile for PPC, specifically the emulator, I get the following error:


Deleting intermediate files and output files for project 'game - Win32 (WCE x86em) Release'.
--------------------Configuration: game - Win32 (WCE x86em) Release--------------------
Compiling resources...
Compiling...
main.cpp
GapiApplication.cpp
Linking...
GapiApplication.obj : error LNK2019: unresolved external symbol _SHFullScreen@8 referenced in function "protected: static long __stdcall CGapiApplication::ToggleFullscreen(struct HWND__ *,int)" (?ToggleFullscreen@CGapiApplication@@KGJPAUHWND__@@H@Z)
X86EMRel/game.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

game.exe - 2 error(s), 0 warning(s)


I'm thinking it can't find a lib, but I don't see any problem with the settings I entered. If you can narrow down where to look that'd be great. Thanks!
I think you need to add the name of the .lib file in project/settings. Choose the environment you wish to build for from the displayed dialog box and select the "link" tab - then just enter the name of the .lib file.
I gave that a shot, it didn't resolve the issue. Any other ideas?

(Nice Black Omega Starfury by the way! Bester kicks ass!)
I got it! I needed to include aygshell.lib in the link info. Just got lucky with a Google search. All seems to be right with the world now.
Good to hear that you got it working!