Skip to main content
GameDev.net gamedev.net
🔒 Locked

DLL in Linux

Started by idinkin Aug 10, 2003 at 12:57 PM 11 replies 2k views
Original Post
idinkin
idinkin
Hey guys! If my engine is a DLL and I use SDL for i/o, creating windows etc. will it work on linux? Thanx in advance..
Sometimes movement is a result of a kick in the ass!
Cherez
Cherez
Linux has full support for .so files (the Unix equivalent to .dll) so provided you know how to compile and load it in Linux you should be fine.
idinkin
idinkin
So I have to compile the code in a special Linux compiler?
Is there a posibility not to do that and to use the same file for numerous operating systems?
Sometimes movement is a result of a kick in the ass!
fizban75
fizban75
Yes, you have to compile your code for Linux. Try gcc. You''ll probably have to make changes to your code if you didn''t write it in a cross-platform manner, (if you used Microsoft MFC classes like CString, for example). You can''t compile on Windows or Mac and run on Linux, if that''s what you''re asking.
idinkin
idinkin
But I do not use platform specific APIs.. I use SDL and OpenGL and my code is written in cross-platform maner, so I have to compile it seperately for every platform?
Sometimes movement is a result of a kick in the ass!
krez
krez
yes.

but if you really use only cross-platform libraries, and non-platform-specific code, it shouldn''t be much trouble.
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
idinkin
idinkin
So which compiler do I need to use for it?
Sometimes movement is a result of a kick in the ass!
idinkin
idinkin
ok.. thanx for your help!
Sometimes movement is a result of a kick in the ass!
grasshopa55
grasshopa55
Here is a great how-to describing how to make any type of basic library on Linux

http://www.tldp.org/HOWTO/Program-Library-HOWTO/index.html

-----------------------------
kevin@mayday-anime.com
http://www.mayday-anime.com

edit - link

[edited by - grasshopa55 on August 12, 2003 10:17:49 AM]
-----------------------------kevin@mayday-anime.comhttp://www.mayday-anime.com
tortoise
tortoise
But what do you mean your "engine is a DLL" and you use SDL? Do you mean you are using sdl.dll? Or you yourself have written a DLL that is a part of your game?

If you''ve used SDL and your program is generally cross platform friendly, then you can use the Linux version of SDL under Linux. Did you follow SDL''s guidelines for keeping your SDL app portable? Of course you still need to recompile your own code, but the SDL end of it should be ok.
NaliXL
NaliXL
Doesn''t the new Visual Studio generate .net code? If it''s .net, you should be able to use it directly under Linux, isn''t it?
Newbie programmers think programming is hard.Amature programmers think programming is easy.Professional programmers know programming is hard.
superpig
superpig
quote:
Original post by NaliXL
If it's .net, you should be able to use it directly under Linux, isn't it?


No.

[edited by - Superpig on August 13, 2003 7:21:34 AM]
Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.