Samapico Posted December 15, 2009 Report Posted December 15, 2009 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. Quote
Hakaku Posted December 15, 2009 Report Posted December 15, 2009 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'. Quote
Samapico Posted December 15, 2009 Author Report Posted December 15, 2009 Well, for an actual module it's a dll, but the tutorial was showing how to get a simple console exe running Quote
Samapico Posted December 15, 2009 Author Report Posted December 15, 2009 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? Quote
Hakaku Posted December 15, 2009 Report Posted December 15, 2009 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). Quote
Samapico Posted December 15, 2009 Author Report Posted December 15, 2009 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 Quote
Hakaku Posted December 15, 2009 Report Posted December 15, 2009 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 Quote
Samapico Posted December 15, 2009 Author Report Posted December 15, 2009 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 Quote
Hakaku Posted December 15, 2009 Report Posted December 15, 2009 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. Quote
Samapico Posted December 15, 2009 Author Report Posted December 15, 2009 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 Quote
Bak Posted December 15, 2009 Report Posted December 15, 2009 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. Quote
Dr Brain Posted December 15, 2009 Report Posted December 15, 2009 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. Quote
Samapico Posted December 15, 2009 Author Report Posted December 15, 2009 Yeah, but it also makes sense to have the bin folder in a working state... I guess it's debatable But thanks edit: Fakeplayer kills itself, lulz Quote
Bak Posted December 15, 2009 Report Posted December 15, 2009 Needed to test other player deaths... easier than doing damage detection! Quote
Samapico Posted December 20, 2009 Author Report Posted December 20, 2009 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?) Quote
Dr Brain Posted December 20, 2009 Report Posted December 20, 2009 Did you save the file before building? I always configure eclipse to save my files before building, otherwise I forget. Quote
Samapico Posted December 20, 2009 Author Report Posted December 20, 2009 Oh, that's pretty dumb... it doesn't even build what you see by default... pft. weee, first successful build (after the Hello world program) Quote
Bak Posted December 20, 2009 Report Posted December 20, 2009 I always configure eclipse to save my files before building How do you do this? Quote
Samapico Posted December 20, 2009 Author Report Posted December 20, 2009 I always configure eclipse to save my files before building How do you do this?Window -> preferences -> General -> workspace ; Save automatically before build Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.