# Unity problem switching to Eclipse with SDL and OpenGL (Windows) [SOLVED]

This topic is 3317 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

As Windows is not my primary platform of development and I loathed the manifest + 6 flavors of runtime system that comes with MSVS (not to mention the several hundred megabyte SDK's), I've been using Dev-Cpp, which is highly deprecated. I've learned about Eclipse, which seems ever so sleek and today I've made my switch to it. I'm using SDL and OpenGL. I've found two tutorials, [1] and [2] on the subject, and they proved quite helpful. - I'm using the preprocessor symbol main=SDL_main (tried without, too) - I'm linking against mingw32, SDLmain, SDL (in the given order, however I've tried to switch around their precedence), tried the -mwindows flag (and without). - I'm keeping my SDL includes, libraries and binaries in MinGW's respective folders (although tried with them being kept separately), thus I'm not specifying their locations (elmininating the duplicate path entry warning)) However, when I'm trying to build the simple example,
[source lang=cpp]
#include <stdio.h>
#include <SDL/SDL.h>

int main(int argc, char* argv[]) {
printf("Hello, SDL User!n");

if(SDL_Init(SDL_INIT_VIDEO) < 0) {
fprintf(stderr, "Video initialization failed: %s", SDL_GetError());
return 1;
}

SDL_Quit();

return 0;
}


The compiler barfs at me as follows: /Users/hercules/trunk/SDL-1.2/./src/main/win32/SDL_win32_main.c undefined reference to `SDL_main' What on earth is causing this and how can this be fixed? (Yes, there is a similar thread, however it has been retired while the problem wasn't solved.) [Edited by - trajectorymodifier on June 20, 2009 7:56:28 AM]

##### Share on other sites
gah. problem solved - Eclipse needed one more restart.

1. 1
2. 2
Rutin
24
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 17
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631759
• Total Posts
3002162
×