Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Linker settings for SDL2 on Linux


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 maxter   Members   -  Reputation: 102

Like
0Likes
Like

Posted 12 March 2014 - 04:19 PM

I'm trying to get a basic SDL2 program to run, but I'm running into issues with my linker settings.  Namely the linker settings I have are resulting in the following errors:

 

 

ld||cannot find -lmingw32|
ld||cannot find -ldinput8|
ld||cannot find -ldxguid|
ld||cannot find -ldxerr8|
ld||cannot find -luser32|
ld||cannot find -lgdi32|
ld||cannot find -lwinmm|
ld||cannot find -limm32|
 

...

ld||cannot find -luuid|
||=== Build finished: 26 errors, 0 warnings ===|

 

I have the SDL2.a, SDL2main.a, and SDL2_image.a files under link libraries, I have the necessary header files in search directories for the compiler.

 

I am using Codeblocks on Ubuntu 12.04, and I have installed mingw32 on this system.  What am I doing incorrectly?



Sponsor:

#2 theslimde   Members   -  Reputation: 123

Like
0Likes
Like

Posted 13 March 2014 - 01:42 AM

Hmm, are you trying to cross compile for Windows? In this case you need to get a hold of the shared libraries

that you are missing (dinput8, dxguid, dxerr8, ...).

 

Since you said that you are just trying to get a simple SDL2 program to run, I assume the above is not the case.

 

If you are just trying to compile the SDL2 project, you would not use mingw on linux. Just go with

 

g++ -o <OutputFileName> <ListOfSrcFiled> -lSDL2

 

appending whatever other libraries you need.



#3 ryutenchi   Members   -  Reputation: 353

Like
0Likes
Like

Posted 13 March 2014 - 03:05 AM

yeah, everyone of those libs is windows specific. Are you using a tutorial?



#4 maxter   Members   -  Reputation: 102

Like
0Likes
Like

Posted 13 March 2014 - 09:09 AM

yeah, everyone of those libs is windows specific. Are you using a tutorial?

 

The linker settings I found on a stackoverflow response to a question regarding setup.  I honestly forgot if it was meant specifically for windows, although I do plan on cross-compiling when I have a finished product.  I'm still learning, so it's not a very complicated project at all.  I'm going to go with the advice of the response above and report back later.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS