I use an Open Solver open source called Nomad 3.8.1. I installed MinGw with g++ and Visual Basic with nmake
I have several directories (build of software/ source code, etc) In the example provided there are two files (basic_lib.cpp for calculate and Makefile)
However, in the documentation i saw makefile is for Linux (I work with Windows)
So I updated makefile
EXE = basic_lib.exe
COMPILATOR = g++
COMPILATOR_OPTIONS = -O2 -ansi
LIB_DIR = C:/Users/***/Documents/nomad.3.8.1/lib
LIB_NOMAD = libnomad.so
CXXFLAGS =
CXXFLAGS_MPI = $(CXXFLAGS) -DUSE_MPI
LDLIBS = -lm -lnomad
INCLUDE = -IC:/Users/***/Documents/nomad.3.8.1/src -IC:/Users/***/Documents/nomad.3.8.1/ext/sgtelib/src -I.
COMPILE = $(COMPILATOR) $(COMPILATOR_OPTIONS) $(INCLUDE) -c
COMPILE_MPI = $(COMPILATOR_MPI) $(COMPILATOR_OPTIONS_MPI) $(INCLUDE) -c
OBJS = basic_lib.o
$(EXE): $(OBJS)
$(ECHO_NOMAD)
@echo " building the scalar version ..."
@echo " exe file : "$(EXE)
@$(COMPILATOR) -o $(EXE) $(OBJS) $(LDLIBS) $(CXXFLAGS) -L$(LIB_DIR)
basic_lib.o: basic_lib.cpp
$(ECHO_NOMAD)
@$(COMPILE) basic_lib.cpp
Directories src contain .cpp and .hpp
When I run nmake with Visual Basic I obtain the error ld.exe: cannot find -lnomad collect2: ld returned 1 exit status
Could you help me ? (I don't know what can be nomad...)