Jump to content

  • Log In with Google      Sign In   
  • Create Account


huymoi7

Member Since 11 Mar 2013
Offline Last Active May 08 2013 06:50 PM
-----

Posts I've Made

In Topic: lib3ds

21 March 2013 - 08:15 PM

Just a hypothesis but, when I've installed other libraries (opengl, glut, sdl) in the past I often have to edit the linker settings via "Build options". i.e.

 

 

63978376.png
 
Could there be something I need to do here (I ask because I know it's specifically a linker problem)? 
 
Lastly here is what my "Search directories" tab looks like (in case it helps)
 

49273218.png
 
 

In Topic: lib3ds

21 March 2013 - 08:05 PM

Alright so I used MSYS to help me compile the library using a ./configure -> make -> make install process.

It gave me some new files in the lib3ds directory, as per below


75903236.png

It appears that each .c file is given a .o and .ol file, there is also two new directories (there is also a .la file). The .deps directory is full .pol files and .libs directory is full of .o files.

Does this look right? There still are no .lib or .dll files.

I linked the Codeblocks compiler (Settings -> Compiler -> Search Directories -> Linker) and set them both to the src folder. It didn't work. I then proceeded to set every folder in lib3ds (i.e. ./lib3ds, ./lib3ds/src, ./lib3ds/src/.libs, ./lib3ds/src/.deps), but still the error says


43500337.png

I feel like I'm so close I'm following instructions as far as I can tell perfectly but it still just won't work. Does the compilation look right? Any suggestions please? Thanks in advance.

In Topic: lib3ds

20 March 2013 - 05:27 PM

Hey so the readme file just gave me a link to the website in which to download it but there is a file called "INSTALL", but it gives me instructions on how to compile it in linux and I am working in windows.

 

Is there a way to run make files in windows? Or do I have download it on linux, precompile it there and transfer it to my windows machine?

 

Cheers


In Topic: lib3ds

20 March 2013 - 06:28 AM

There is no .dll files or .lib files (just .h, .cpp and some make files). So does that mean I do not link anything?

 

I redirected my compiler in code blocks to the folder with the lib3ds h files (settings->compiler->search directories tab).

 

Here is a picture of my problem.

 

 

20702231.jpg
 
 
  • It detects the included header file <lib3ds.h>

  • It understands the type Lib3dsFile from <lib3ds.h> 

  • but I can't get it to understand the function 'lib3ds_file_open'. It gives me an "undefined reference to 'lib3ds_file_open' error.

 

but when I hover my mouse over the function it displays the function prototype (as seen in the .h file), I also went to the included .h file for <lib3ds.h> and checked that the function is there (which it is).

 

Why can I detect the lib3ds.h file, read in a struct from it, but fail to find a reference to the lib3ds_file_open function?


In Topic: Starting OpenGL

12 March 2013 - 12:39 AM

SetPixelFormat is not part of WGL, it is part of the gdi32 DLL. The WGL* stuff is in the opengl32 DLL. Glut doesn't install any of that for you, but it is all available as part of your compiler installation.

Your problem is that you are calling Win32 API functions (ChoosePixelFormat, SetPixelFormat and so on) without linking to the Win32 API libraries. Furthermore, if you are using glut you don't need to be making all of those calls in the first place. Glut exists to hide that from you so that you can more easily get up and running with cross platform OpenGL. You should be creating an OpenGL context and window through the Glut API, *not* win32. So you need to make up your mind which way you're going to go. If you want to use Win32, then link to the appropriate Win32 libraries (kernel32.lib, gdi32.lib and so one) and ditch glut. Otherwise, take out all the win32 stuff and learn how to use glut.

 

Thanks for clearing that up for me. I'm just following this book right now. I don't know much about the difference between the Win32 and GLUT APIs, but if using both is redundant than you're right I should just use one. I'll also keep this in mind while I go through the book.


PARTNERS