Hi Everybody,

I am running win7 x64 with Matlab R2010b.

I am trying to build the mex file nlopt_optimize.mexw64. I built libnlopt-0.exp
and libnlopt-0.lib from the Command Prompt by running 

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat 

from the command prompt and then using the command

lib /def:libnlopt-0.def /MACHINE:X64

I then open matlab and move in the folder ..\nlopt-2.2.3-dll\matlab; from there
I run the command 

mex nlopt_optimize.c ..\libnlopt-0.lib -I..\

but unfortunately I keep getting the following errors:


LINK : warning LNK4044: unrecognized option '/lkernel32'; ignored 
   Creating library
C:\Users\SIMONE~1.FOR\AppData\Local\Temp\mex_Kdcnyr\templib.x and object
C:\Users\SIMONE~1.FOR\AppData\Local\Temp\mex_Kdcnyr\templib.exp 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_local_optimizer referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_initial_step referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_vector_storage referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_population referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_maxtime referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_maxeval referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_xtol_abs referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_xtol_rel referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_ftol_abs referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_ftol_rel referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_stopval referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_upper_bounds referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_lower_bounds referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_destroy referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_create referenced in function make_opt 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_optimize referenced in function mexFunction 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_add_equality_constraint referenced in function mexFunction 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_add_inequality_constraint referenced in function mexFunction 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_max_objective referenced in function mexFunction 
nlopt_optimize.obj : error LNK2019: unresolved external symbol
__imp_nlopt_set_min_objective referenced in function mexFunction 
nlopt_optimize.mexw64 : fatal error LNK1120: 20 unresolved externals 
 
  C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Link of 'nlopt_optimize.mexw64'
failed. 
 
??? Error using ==> mex at 208
Unable to complete successfully.


I don't understand what I am doing wrong, do you guys have any idea??

Thanks!

airolds






_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss

Reply via email to