Jump to content
SubSpace Forum Network

Recommended Posts

Posted

So I was following this tutorial to get Eclipse running:

http://wiki.minegoboom.com/images/1/15/Disc_eclipse.wmv

 

But mine won't even build the hello world program... something about unreferenced winmain@16. I'm guessing it's trying to compile as a windows program, and not a standard console one. I did choose 'Empty project' when creating the new project, didn't find anywhere to change these kind of options.

Posted
In the menu, click 'Projects', then select properties. In the navigation menu on the left, choose C/C++ Build, then settings. Click on the tab named 'Build Artifact' and choose Shared Library. Make sure the extension says 'dll'.
Posted

Hmmm, oh well, I guess setting it as a dll works.

 

Thanks

 

 

 

--------------

Also, the template folder doesn't seem to have the project files anymore, just the .cpp and .h (client\trunk\disc_client\src\Module_Template)

But I guess there was nothing special in the project template, except this dll setting?

Posted

Oh woops, I assumed it was a module tutorial >< In that case, for Hello World, you need to make sure it's an empty executable project. Same steps as I said above, just replace shared library with exe.

 

Edit: I didn't really bother with the template folder since I couldn't find it either, but you should be able to test it with any other folder. If there's anything else specific to compiling a Discretion module, it would be to make sure to setup SDL in Eclipse if it isn't already (steps 1-4).

Posted

That's what I had, empty project, and the build artifacts thing had 'executable' selected...

 

I guess I won't need to build an executable in this thing anytime soon anyway.

 

Though I might need some directions to get the whole thing built for testing, I'm kinda lost blum.gif

Posted

Still weird, I followed the tutorial exactly how it was, and had no problems running it. I think the only difference was the name for the 'run configurations' in the menu, though that has nothing to do with compiling. Edit: Maybe if it's of any help, I'll attach my workspace so you can test; perhaps you accidentally made a mistake somewhere?

 

As for the rest, Discretion is a bit confusing, but what I noticed was that pretty much all the subfolders in the source folder are actually Eclipse projects. So you can literally just change your workspace to one of those folders and mess around with that to understand how it works. You can then give it a go at creating a workspace with the module template files, and follow the tutorial.

workspace4.rar

Posted

Also... is it normal that the discretion.bat from the SVN doesn't work right? The bin\modules folder is filled with other folders with only a .so.sig file... Shouldn't there be a bunch of dll's in there? Do I need to make some kind of mass build or something?

 

Here's the output when I run the .bat:

D:\Sam\Prog Projects\Discretion\client\trunk\disc_client\bin>discretion.bat
Using debug terminal trick... (cskinviewer ..\main.cpp, line 1788)
Error: Can't find SettingsHandler module at path = './Modules/SettingsHandler/Se
ttingsHandler.so'ERROR: debug: dlopen failed on Modules/SettingsHandler.so, syst
em returned error: Le module spÚcifiÚ est introuvable.
code(126) in function loadAndGetInterface, on line 223 in file ..\Settings.cpp
ERROR: SettingsHandler Module not found at modules/SettingsHandler in function l
oadSkinSettings, on line 259 in file ..\Settings.cpp
error loading skin settings
Exit code: 0. Exiting in 2 seconds...
'SLEEP' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

 

Basically the module can't be found... Modules/SettingsHandler.so doesn't exist, only Modules/SettingsHandler.so.sig

Posted

Oh wait, I was wrong, you can't just switch workspace, you need to import the module projects into eclipse, my bad. That is, create any workspace anywhere, then File > Import > General > Existing Projects into Workspace (select something like src/Modules/Animations).

 

On that note, maybe I need to review the tutorials myself since you're right, they aren't compiled as dll files >< Scrap that, the tutorial shows everything is compiled as dlls...

 

As for the asss.bat, I get that too.

Posted

The whole file/directory structure seems to have changed a bit since when the video tutorials were made, so it's kind of confusing.

 

The fact that's it's 3am doesn't help blum.gif

Posted

Goldeye was adamant that the svn should not contain binary files, so I removed the .so files (.dlls) from the svn a while ago. I readded them now, just for you (screw Goldeye!). There will be debug output to the console as I'm actively developing the version in the svn, although it should work just fine.

 

But I guess there was nothing special in the project template, except this dll setting?
Yes that's correct. It also would build the .dll (.so) and put it in the right place. You can copy one of the other folders if you want an existing project (SelfShip is the one I usually use), just make sure you rename the build artifact from SelfShip to whatever name you want.
Posted

Goldeye was adamant that the svn should not contain binary files, so I removed the .so files (.dlls) from the svn. You can download the binary distribution and paste the Modules folder if you want. Maybe I'll just re-add the .so's to the svn.

It is considered bad form to have the output files in the version control. Of course, every situation is different and you have to make judgment calls.

Posted

Yeah, but it also makes sense to have the bin folder in a working state... I guess it's debatable blum.gif

 

But thanks

 

 

edit: Fakeplayer kills itself, lulz

Posted

Ok... what the hell is wrong with Eclipse?

 

It gives me compiling errors on comment lines, and when I double-click an error in the 'Problems' tab, it brings me to a totally unrelated line, sometimes changing the selected problem at the same time...

 

I get a lot of 'chat was not declared in this scope' , and the same for every imaginable module... even if I comment them out

 

 

(The code you see is a copy-paste of the DCME code to import LVZ's, commented out... unless eclipse doesn't support //comments?)

wtfeclipse.png

Posted
I always configure eclipse to save my files before building
How do you do this?

Window -> preferences -> General -> workspace ; Save automatically before build

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...