12:2 invalid preprocessing directive #pragma

May 11, 2011 at 5:07pm
Man, I feel like such a newbie(because I am)but... I have encountered another error. Just one this time, the error is in line 12 I think and the line is...

#pramga comment(linker, "/subsystem:windows /Entry:mainCRTStartup")

Now, I am a bit confused as to why(well of course, otherwise I wouldnt ask)but I am doing this form the irrlicht helloworld tutorial so...
Please help! Thanks!
May 11, 2011 at 5:11pm
I don't see those linker options here http://msdn.microsoft.com/en-us/library/7f0aews7(VS.80).aspx. Where did you get that example from again? And what compiler are you using?
May 11, 2011 at 5:42pm
Just comment that linr, it is not needed. mainCRTStertup entry point is by default called automatically if you link against Microsoft C runtime library (which is 99% the case).
I suppose you are using Visual Studio, no other compiler recognize that syntax.
May 12, 2011 at 4:16pm
Fixed that, now I have a new problem with this error message when i try to debug

An access violation(Segmentation Fault)raised in your program.

What do I do about that?

EDIT: Turns out the program folder was missing the irrlicht.dll file. Fixed it.
Last edited on May 12, 2011 at 4:35pm
May 12, 2011 at 4:21pm
Fix it, hehe. Seriously, debug your code line by line, examining your variables as you go and determine the exact source of the problem. It could be a bad pointer, a variable not initialized, etc.
Topic archived. No new replies allowed.