Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 1st, 2006, 6:47 AM   #1
megamind5005
Programmer
 
megamind5005's Avatar
 
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4 megamind5005 is on a distinguished road
Compiling Maverik 6.2 (from C)

Well, as you may have realised from the title, I'm having trouble compiling a program called Maverik 6.2 (written in C). It is used for creating Virtual Environments and is written by the "Advanced Interfaces Group" at Manchester University, UK (google it if you want more details). I'm told it has been used by many groups worldwide ...

I've been trying to do this for about a week now, but it seems harder than I thought. Only the source code is provided in the downloads at <aig.cs.man.ac.uk> and I've tried what I could think of using MS Visual C++ (Express Ed.), played around in Cygwin, even downloaded several more linux distros to try to compile on because I didn't manage to get it working on Ubuntu.

To be honest with you, I've never had to compile a program encompassing more than one source file before, but I need to use this program for a project, so if anyone has had any experience with it, could you put me on the right track?
__________________
Tetris is so unrealistic
megamind5005 is offline   Reply With Quote
Old May 1st, 2006, 7:24 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Even persons without direct experience with Maverik might be able to help you. The key is information. The build process is essentially simple. Source files are preprocessed to handle includes, macros, etc. The includes bring in declarations of external things; they're 'copied and pasted' directly into the source. The compiler then gets a pass. It emits code (in a preliminary form) for each of the source files, presuming there are no errors. External code is not required to be present at this stage -- merely how to interact with it (call functions properly, etc.). The linker then comes in from stage left and works its magic. It resolves all the preliminary references, making sure they actually refer to code that is available from one of the other sources, or in a library that can be found. When everything is finally tied together, one has an executable file which may or may not rely on external files (such as DLLs for Windows).

Your failure has probably birthed a slew of guiding error messages. Seems silly to ask for help and not give us the same benefits your compiler is giving you.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old May 1st, 2006, 7:58 AM   #3
megamind5005
Programmer
 
megamind5005's Avatar
 
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4 megamind5005 is on a distinguished road
Cygwin:
============
Ok, firstly, here are the good bits of the instructions from the "INSTALL" file:

Building GNU Maverik on UNIX machines
=====================================

To build Maverik you need X11 and either OpenGL, Mesa (version 3.1 or
above) or IrisGL.

Untar the Maverik distribution file which creates the directory
structure shown at the end of this document.

Move into the Maverik directory and type "./setup" followed by
"make". This will compile the Maverik library, example programs, and
any demo programs present.

The "setup" script generates a Makefile appropriate to your
machine. Currently supported UNIX platforms are Irix, RedHat, FreeBSD
and SunOS5. However, we believe that Maverik itself should compile on
any UNIX platform with X11 and OpenGL/Mesa, so, if you are using a
different platform, edit the script, fill in the appropriate values
and mail us the amendments for inclusion in the next release.
Later on it says follow these same instructions for cygwin, so I did and this is what happens:
1) I enter "./setup" and it obviously does something "useful" for a while and then it prints a line and the bash prompt again.
2) when I enter "make" I get all of this rubbish:
make libs  "CC= gcc"  "CFLAG= -DMAV_CYGWIN -DWIN32 -Wall -O2 -finline-functions
-fomit-frame-pointer -funroll-loops"  "LD= "  "DLLIBS= "  "LEX= flex"  "YACC= bi
son -y"  "CXX= g++"  "CXXFLAG= -DMAV_CYGWIN -DWIN32"  "VRML97COMP= 0"  "VVCOMP=
0"  "OPENGLINCL= "  "OPENGLLIBS= "
cd src; make
--- errorlevel 1

--- errorlevel 1

Fantastic.

VC++
=========
Now it has some more instructions for VC++ which are straightforward, seemingly:
Using Visual C++
----------------

Workspace and project files for Microsoft Visual C++ (version 6.0) can
be found in the vc++ sub-directory of the Maverik distribution. These
compile the Maverik libraries and example programs.

Move into the vc++ sub-directory and double-click on "maverik.dsw".
This should launch Visual C++. Build the libraries and examples by
selecting batch build (Build->Batch Build->Build).

As of version 6.2 the Maverik libraries are created as DLLs and
therefore their location needs to be present in the PATH environment
variable.

The Maverik libraries are automatically built as needed by the
examples and are placed in the lib sub-directory. The Maverik
libraries are built using the "debug single-threaded" runtime
libraries and thus may fail to link with code built using different
versions of the runtime libraries.
[...]
To build the Maverik demos (if present) double click on "demos.dsw".

To build a Direct3D version of Maverik, instead of the default OpenGL,
rename the libmaverik-d3d.dsp file in the vc++ sub-directory to be
libmaverik.dsp.

I do this in MS VC++ 2005 and the following happens:
1) when i run "averik.dsw" firstly it says that the .dsp files have to all be converted into the newer format so I say Yes to All cos thats the only it'll open them.
2) following the instruction, I proceed to build and my log turns out this:
------ Build started: Project: libmaverik, Configuration: Debug Win32 ------
Compiling...
mav_ac3d.c
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(214) : warning C4996: 'strcpy' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\string.h(73) : see declaration of 'strcpy'
        Message: 'This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(232) : warning C4996: 'sprintf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(345) : see declaration of 'sprintf'
        Message: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(237) : warning C4996: 'sprintf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(345) : see declaration of 'sprintf'
        Message: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(247) : warning C4996: 'sprintf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(345) : see declaration of 'sprintf'
        Message: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(266) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(274) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(284) : warning C4996: 'sscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(311) : see declaration of 'sscanf'
        Message: 'This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(294) : warning C4996: 'sscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(311) : see declaration of 'sscanf'
        Message: 'This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(309) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(315) : warning C4996: 'sscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(311) : see declaration of 'sscanf'
        Message: 'This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(326) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(332) : warning C4996: 'sscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(311) : see declaration of 'sscanf'
        Message: 'This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(343) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(349) : warning C4996: 'sscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(311) : see declaration of 'sscanf'
        Message: 'This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(358) : warning C4996: 'fopen' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(234) : see declaration of 'fopen'
        Message: 'This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(914) : warning C4996: 'strdup' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\string.h(205) : see declaration of 'strdup'
        Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details.'
mav_bb.c
mav_box.c
mav_callback.c
mav_callbacks.c
c:\cygwin\usr\local\src\maverik-6.2\src\callbacks\mav_callbacks.c(249) : warning C4996: 'strcpy' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\string.h(73) : see declaration of 'strcpy'
        Message: 'This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
mav_class.c
mav_clip.c
mav_composite.c
mav_cone.c
mav_crossing.c
mav_ctorus.c
mav_cylinder.c
mav_device.c
mav_draw.c
mav_dump.c
mav_ellipse.c
mav_expose.c
mav_facet.c
mav_frame.c
mav_get.c
Generating Code...
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_ac3d.c(812) : warning C4700: uninitialized local variable 'nolines' used
Compiling...
mav_gfxOpenGL.c
c:\cygwin\usr\local\src\maverik-6.2\src\gfx\mav_gfxopengl.c(35) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
mav_gfxWMOpenGLWin32.c
c:\cygwin\usr\local\src\maverik-6.2\src\gfx\mav_gfxwmopenglwin32.c(125) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
mav_hbb.c
mav_hbbConstruct.c
mav_hellipse.c
mav_hsphere.c
mav_id.c
mav_intersect.c
mav_jif.c
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(59) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(60) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(61) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(62) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(106) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(107) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(108) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(109) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(203) : warning C4996: 'strdup' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\string.h(205) : see declaration of 'strdup'
        Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(207) : warning C4996: 'strcpy' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\string.h(73) : see declaration of 'strcpy'
        Message: 'This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(213) : warning C4996: 'fopen' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(234) : see declaration of 'fopen'
        Message: 'This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(225) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(241) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(244) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(261) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(264) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(270) : warning C4996: 'sprintf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(345) : see declaration of 'sprintf'
        Message: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(274) : warning C4996: 'strcpy' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\string.h(73) : see declaration of 'strcpy'
        Message: 'This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(294) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(298) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(313) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(314) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(315) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(316) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
        Message: 'This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
c:\cygwin\usr\local\src\maverik-6.2\src\objects\mav_jif.c(317) : warning C4996: 'fscanf' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\stdio.h(249) : see declaration of 'fscanf'
[...]
(1000 lines later ...)
[...]
------ Build started: Project: 3Dtext, Configuration: Debug Win32 ------
Compiling...
3Dtext.c
c:\cygwin\usr\local\src\maverik-6.2\examples\misc\text\3dtext.c(108) : warning C4996: 'strdup' was declared deprecated
        c:\program files\microsoft visual studio 8\vc\include\string.h(205) : see declaration of 'strdup'
        Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details.'
Compiling manifest to resources...
Linking...
LINK : fatal error LNK1104: cannot open file 'odbc32.lib'
Build log was saved at "file://c:\cygwin\usr\local\src\maverik-6.2\vc++\3Dtext___Win32_Debug\BuildLog.htm"
3Dtext - 1 error(s), 1 warning(s)
------ Build started: Project: 2Dtext, Configuration: Debug Win32 ------
Compiling...
2Dtext.c
Compiling manifest to resources...
Linking...
LINK : fatal error LNK1104: cannot open file 'odbc32.lib'
Build log was saved at "file://c:\cygwin\usr\local\src\maverik-6.2\vc++\2Dtext___Win32_Debug\BuildLog.htm"
2Dtext - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 52 failed, 0 up-to-date, 0 skipped ==========
note the "52 failed".
__________________
Tetris is so unrealistic
megamind5005 is offline   Reply With Quote
Old May 1st, 2006, 8:44 AM   #4
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Go the project files and add odbc32.lib to resources. If that doesn't work then:

In VC++ go to 'project' then to the bottom menu item called '... properties' where ... is your project name. Then go to 'build events' and to 'pre-build event command line' and put:
/D_CRT_SECURE_NO_DEPRECATE
That should remove your deprecate warnings, please post again for the errors.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old May 1st, 2006, 9:25 AM   #5
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Note that the deprecation warning aren't telling you it failed -- they're warning you that your code may not be compilable in the future (the warnings will become errors). The fact that you have warnings in such a case is not a Bad Thang. Your fatal errors are significant, but relatively straightforward. You would not have gotten to a link with fatal errors in the compile. Your ultimate message is: "LINK : fatal error LNK1104: cannot open file 'odbc32.lib'". Now, that's pretty clear. You may not know how to FIX it, but it's pretty dam' clear. You should not get so frustrated at error messages, even in copious quantities: they are your friend. There is some tendency for a fatal error to generate many messages. If you're missing a library, you may very well get messages telling you about every dang function that's missing. Any time you disable warnings, do it will full knowledge that it's okay, they're not significant warnings, and turn them back on for the next project. Some warnings mean you've most likely made an error, but the compiler is willing to presume you know what you're doing, rightly or wrongly. Best to look at a mess of harmless messages than to miss a significant one.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old May 1st, 2006, 9:39 AM   #6
megamind5005
Programmer
 
megamind5005's Avatar
 
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4 megamind5005 is on a distinguished road
Ok after your last two posts, I played aroudn a bit. nnxion, your comments seem to make sense and i found something on an MSDN blog that said this might help:
You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and change the string that reads:

    AdditionalDependencies="kernel32.lib"

    to

    AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"
I thought I should ask you before I go ahead and do it (altho I could obviously just change it back). But also from what DaWei is saying it sounds like I have this file missing, so how's that gonna work out for me?
Oh and just so you know, in the bits of the log that I missed out I get fatal errors for <windows.h> and <iostream.h> (C1038), so it's not just one or two fatals.

Also, I can't find this "Pre-Build Events" things anywhere. In fact there is only a "Porject -> Properties" route and no "Project -> maverik Properties" as you may have expected, nnxion. and where do I add the .lib file from on my computer? Is it supposed to be somewhere in the VC++ directories?


Thanks
__________________
Tetris is so unrealistic
megamind5005 is offline   Reply With Quote
Old May 1st, 2006, 9:45 AM   #7
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
You have installed the PDSK haven't you? If not, do so.

If you have a default install your libraries will be at: C:\Program Files\Microsoft Visual Studio 8\VC\Platform SDK\lib (I think).

And iostream.h is deprecated C++, so I don't know how it got in C code.

P.S. I have VS 2005 Pro, so that might be different. :o
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old May 1st, 2006, 10:17 AM   #8
megamind5005
Programmer
 
megamind5005's Avatar
 
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4 megamind5005 is on a distinguished road
... why are you the first the person to tell me I need that? so many books and articles and tutorials, none mentioned it! So, thanks!

This looks like a big download so I'll get it done and report back.
In the meantime, if anyone can come up with a solution for the Cygwin way, it might save a bit of time and be helpful for future reference (for me and forum-users alike).

Thanks again, nnxion
__________________
Tetris is so unrealistic
megamind5005 is offline   Reply With Quote
Old May 1st, 2006, 10:41 AM   #9
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Make sure you're compiling as a C program, not a C++ program (if Maverik is C). As Ruben says, those deprecations are predominantly C++ thangys. Further, whoever wrote Maverik may have used some things that are valid C but invalid C++.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old May 1st, 2006, 11:35 AM   #10
megamind5005
Programmer
 
megamind5005's Avatar
 
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4 megamind5005 is on a distinguished road
How do you make sure VC++ is treating it as C code?
__________________
Tetris is so unrealistic
megamind5005 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:16 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC