Pages: [1] 2
|
|
|
Author
|
Topic: Compiling with Visual Studio .NET ... (Read 8589 times)
|
Kuma
Guest
|
Is it even possible?
I've tinkered around with the source, and I've made what I think are some interesting modifications - but I haven't the first clue about how to compile it with Visual Studio.
Can anyone give me a place to start?
|
|
|
Logged
|
|
|
|
|
harth1026
*Many bubbles*
Offline
Gender:
Posts: 142
|
What kind of errors are you getting? I too am using the .NET compiler so maybe I can help...
|
|
|
Logged
|
|
|
|
abcminiuser
Zebranky food
Offline
Posts: 10
I love YaBB 1G - SP1!
|
I need som help with this also. I've downloaded and compiled all the components, but .NET now goes ape when I try to compile:
libcmtd.lib(dbgheap.obj) : error LNK2005: _malloc already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(dbgheap.obj) : error LNK2005: _calloc already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(dbgheap.obj) : error LNK2005: _realloc already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(dbgheap.obj) : error LNK2005: _free already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(fpinit.obj) : error LNK2005: __ldused already defined in a previous module libcmtd.lib(fpinit.obj) : error LNK2005: __fltused already defined in a previous module libcmtd.lib(write.obj) : error LNK2005: __write already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(crt0dat.obj) : error LNK2005: __c_exit already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(dosmap.obj) : error LNK2005: __errno already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in MSVCRTD.lib(crtexe.obj) libcmtd.lib(crt0.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(open.obj) : error LNK2005: __open already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj) libcmtd.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj) libcmtd.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj) libcmtd.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj) libcmtd.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(read.obj) : error LNK2005: __read already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(lseek.obj) : error LNK2005: __lseek already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(setlocal.obj) : error LNK2005: _setlocale already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(getenv.obj) : error LNK2005: _getenv already defined in MSVCRTD.lib(MSVCR70D.dll) libcmtd.lib(tolower.obj) : error LNK2005: _tolower already defined in MSVCRTD.lib(MSVCR70D.dll) MSVCRTD.lib(MSVCR70D.dll) : error LNK2005: __stricmp already defined in libcmtd.lib(stricmp.obj) MSVCRTD.lib(MSVCR70D.dll) : error LNK2005: __isatty already defined in libcmtd.lib(isatty.obj) MSVCRTD.lib(MSVCR70D.dll) : error LNK2005: __close already defined in libcmtd.lib(close.obj) MSVCRTD.lib(MSVCR70D.dll) : error LNK2005: _fopen already defined in libcmtd.lib(fopen.obj) MSVCRTD.lib(MSVCR70D.dll) : error LNK2005: _fclose already defined in libcmtd.lib(fclose.obj) MSVCRTD.lib(MSVCR70D.dll) : error LNK2005: __isctype already defined in libcmtd.lib(isctype.obj) LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmtd.lib' conflicts with use of other libs; use /NODEFAULTLIB:library vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_sync_clear referenced in function _ov_clear vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_stream_clear referenced in function _ov_clear vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_stream_init referenced in function __ov_open1 vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_sync_wrote referenced in function __ov_open1 vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_sync_buffer referenced in function __ov_open1 vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_sync_init referenced in function __ov_open1 vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_stream_packetout referenced in function __fetch_headers vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_stream_pagein referenced in function __fetch_headers vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_stream_reset_serialno referenced in function __fetch_headers vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_page_serialno referenced in function __fetch_headers vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_sync_pageseek referenced in function __get_next_page vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_sync_reset referenced in function __seek_helper vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_page_granulepos referenced in function __prefetch_all_headers vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_page_eos referenced in function _ov_raw_seek vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_stream_reset referenced in function _ov_raw_seek vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_page_continued referenced in function _ov_pcm_seek_page vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_stream_packetpeek referenced in function _ov_pcm_seek_page vorbisfile.lib(res0.obj) : error LNK2001: unresolved external symbol _oggpack_read vorbisfile.lib(floor1.obj) : error LNK2019: unresolved external symbol _oggpack_read referenced in function _floor1_fit vorbisfile.lib(floor0.obj) : error LNK2001: unresolved external symbol _oggpack_read vorbisfile.lib(info.obj) : error LNK2019: unresolved external symbol _oggpack_read referenced in function _vorbis_synthesis_headerin vorbisfile.lib(synthesis.obj) : error LNK2001: unresolved external symbol _oggpack_read vorbisfile.lib(codebook.obj) : error LNK2001: unresolved external symbol _oggpack_read vorbisfile.lib(mapping0.obj) : error LNK2001: unresolved external symbol _oggpack_read vorbisfile.lib(info.obj) : error LNK2019: unresolved external symbol _oggpack_readinit referenced in function _vorbis_synthesis_headerin vorbisfile.lib(synthesis.obj) : error LNK2001: unresolved external symbol _oggpack_readinit vorbisfile.lib(info.obj) : error LNK2019: unresolved external symbol _oggpack_bytes referenced in function _vorbis_commentheader_out vorbisfile.lib(analysis.obj) : error LNK2001: unresolved external symbol _oggpack_bytes vorbisfile.lib(bitrate.obj) : error LNK2001: unresolved external symbol _oggpack_bytes vorbisfile.lib(mapping0.obj) : error LNK2001: unresolved external symbol _oggpack_bytes vorbisfile.lib(info.obj) : error LNK2019: unresolved external symbol _oggpack_writeinit referenced in function _vorbis_commentheader_out vorbisfile.lib(block.obj) : error LNK2001: unresolved external symbol _oggpack_writeinit vorbisfile.lib(bitrate.obj) : error LNK2001: unresolved external symbol _oggpack_writeinit vorbisfile.lib(floor1.obj) : error LNK2001: unresolved external symbol _oggpack_write vorbisfile.lib(info.obj) : error LNK2019: unresolved external symbol _oggpack_write referenced in function __vorbis_pack_comment vorbisfile.lib(codebook.obj) : error LNK2001: unresolved external symbol _oggpack_write vorbisfile.lib(mapping0.obj) : error LNK2001: unresolved external symbol _oggpack_write vorbisfile.lib(res0.obj) : error LNK2001: unresolved external symbol _oggpack_write vorbisfile.lib(info.obj) : error LNK2019: unresolved external symbol _oggpack_writeclear referenced in function _vorbis_analysis_headerout vorbisfile.lib(block.obj) : error LNK2001: unresolved external symbol _oggpack_writeclear vorbisfile.lib(bitrate.obj) : error LNK2001: unresolved external symbol _oggpack_writeclear vorbisfile.lib(info.obj) : error LNK2019: unresolved external symbol _oggpack_reset referenced in function _vorbis_analysis_headerout vorbisfile.lib(analysis.obj) : error LNK2001: unresolved external symbol _oggpack_reset vorbisfile.lib(analysis.obj) : error LNK2019: unresolved external symbol _oggpack_get_buffer referenced in function _vorbis_analysis vorbisfile.lib(bitrate.obj) : error LNK2019: unresolved external symbol _oggpack_get_buffer referenced in function _vorbis_bitrate_init vorbisfile.lib(codebook.obj) : error LNK2019: unresolved external symbol _oggpack_adv referenced in function _decode_packed_entry_number vorbisfile.lib(codebook.obj) : error LNK2019: unresolved external symbol _oggpack_look referenced in function _decode_packed_entry_number vorbisfile.lib(mapping0.obj) : error LNK2019: unresolved external symbol _oggpack_writealign referenced in function _mapping0_forward ../../uqmdebug.exe : fatal error LNK1120: 28 unresolved externals
Ideas? The OGG .lib files seem to have compiled OK. - Dean :twisted:
|
|
|
Logged
|
|
|
|
harth1026
*Many bubbles*
Offline
Gender:
Posts: 142
|
Part of the problem appears to be that you didn't tell Visual Studio where the Ogg Vorbis libraries are.
In the menubar, select Tools->Options... In the Options dialog, select Projects->VC++ Directories In the top right, it'll have a pulldown menu called "Show Directories for"... Select "Include files" Add the entry "C:\Oggvorbis\Include" or whatever path the include files are in. Now go back to the pulldown menu and select "Library files". Add the entry "C:\Oggvorbis\Lib". Change where necessary.
After all that, recompile the code. Most of those linker errors should be gone... I'm not too sure why you're getting "already defined" errors though...
|
|
|
Logged
|
|
|
|
|
abcminiuser
Zebranky food
Offline
Posts: 10
I love YaBB 1G - SP1!
|
Hmm, I defined all the libraries I could find, must have missed the OGG one. No matter; I've got the binaries and only wanted to compile the source code so I could make changes/additions. After looking at the code I've decided to scrap that idea and create a new game ("Star Control 2.5", even though I HATE Star Control 3) with the SDL libraries et al. The SDL library is fantastic, isn't it! I've always wanted to make a proper game, just never found the right language and libraries to do it in, no I have.
- Dean :twisted:
|
|
|
Logged
|
|
|
|
harth1026
*Many bubbles*
Offline
Gender:
Posts: 142
|
Starting a new game like Star Control 2 from scratch will take a lot of time and dedication plus existing knowledge of game programming. My goal is to make an SC1 game using parts of the UQM code. Although I'm dedicated, I have little time and I'm just starting to learn the basics of game programming. If you don't have much experience with game programming, I recommend that you start off with small games that are similar to your goal. You may want to try making an Asteroids style game first and then build from there.
A good tutorial for making an asteroids game can be found at the following site. Although I couldn't get the code to compile without some work, the class structures he used gave me a better understanding how to make a game of this type. http://vcg.iei.pi.cnr.it/~cignoni/a_steroid/
|
|
|
Logged
|
|
|
|
abcminiuser
Zebranky food
Offline
Posts: 10
I love YaBB 1G - SP1!
|
Nah, i've never listened to the experts before. I taught myself Visual Basic many years ago, then taught myself C last year. Going against all the experts advice for the latter language, I mamaged to produce a very complicated and *working* project.
I don't have much gaming experience, but I do write C for embedded systems - small microcontroller ICs. That involves a lot of abstract thinking on the best way to acomplish a task with the minimum amount of code, and also multiple threads when using a Real Time Operating System - similar to the SDL libraries's threads.
Worked out how to implement all the music, text image and main SDL libraries now. I've made most fo the helper C files and got the main menu working as a test. I though threads for the Melee is the best way to go - a thread per bullet and ship, what do you think? I could make it to inline, just seemed the best and easiest option.
- Dean
|
|
|
Logged
|
|
|
|
meep-eep
Forum Admin
Enlightened
Offline
Posts: 2847
|
I though threads for the Melee is the best way to go - a thread per bullet and ship, what do you think? I could make it to inline, just seemed the best and easiest option. While one thread per object may closest resemble the intuitive idea, in practice it's probably the worst way to do this. There's a large overhead in context switching, and synchronisation would be a lot of work and would have its own overhead (which would be a lot as you'd need to synchronise frequently).
How I would suggest you handle processing intead is to keep a list of all active objects, and process them one by one. Running at a fixed frame rate is easiest, as you can use "distance per frame" as a unit for speed. This is how UQM works. You could also use a dynamic frame rate, and process as often as you can (or want), multiplying speed by the time elapsed since the last update to get the distance to move.
|
|
« Last Edit: June 29, 2005, 08:02:39 am by meep-eep »
|
Logged
|
“When Juffo-Wup is complete when at last there is no Void, no Non when the Creators return then we can finally rest.”
|
|
|
|
abcminiuser
Zebranky food
Offline
Posts: 10
I love YaBB 1G - SP1!
|
*Sigh*. Ok, Ok, i'll give the asteroids game a look. I've managed to write the interface routines with the SDL, SDL Image, SDL Mixer and SDL Draw libraries so i'm finally ready to start. Made the main menu as a test, all works well.
- Dean :twisted:
|
|
|
Logged
|
|
|
|
Dean
Guest
|
So how would I go about "linking" the melee modules together? I'm able to program all the modules (like physics handler, keyboard handler, ship position updater, etc) but i'm at a loss as to put it all together. Normally i'd use said threads, but at the moment i'm resorting to using rather crude IF checks to ensure each routine is only executed after a specified millisecond elapse. This works OK (for now) but when I put in all the bullet handling routines this definetly wont work (well).
Writing dynamic routines - so that the routines could be executed as many times as possible without speeding up/slowing down the game - is possible for me, but it just seems like a hassle. How would I go about implementing a fixed run rate for each routine, like a simple task sheduler?
- Dean
|
|
|
Logged
|
|
|
|
|
abcminiuser
Zebranky food
Offline
Posts: 10
I love YaBB 1G - SP1!
|
Oh. I coded in a simple task switcher yesterday - it works fine.
Each task is added with a function name and a timeout:
MeleeTaskHandler_AddTask(Melee_PlayerKeyHandler, 20);
The above code would tell the program to run the "Melee_PlayerKeyHandler" function every 20ms (or more, depending on machine speed). I decided to put a limit on the number of tasks, at 30. The main loop then calls the MeleeTaskHandler_CheckTasks routine, which checks the current SDL ticks, and then see if it should run any of the tasks. If a task is run, it's .NextTimeout tag is set to the current SDL tickcount + the timeout for the current task.
It all works quite well. If the tasks are offset, then the whole thing runs nicely at 700MHz- will have to stress-test on all 30 tasks.
Figuring out all the physics and such from scratch is difficult, but i'm going well and i'll have one hell-of-a sence of achievement when the whole thing's done. Anyone interested in submitting ship pictures/designs/music etc. once I have somthing to show for myself? Unlike TimeWarp and other projects, this will be a proper adventure game with a new and exciting(?!) story and BALANCED SHIPS. Stay tuned.
- Dean
|
|
|
Logged
|
|
|
|
Pages: [1] 2
|
|
|
|
|