Hi Stefan,

I hope you have fixed your problem of compiling a c++ Meep code. If not, I
have some tips for you. Use the Ubuntu's Synaptic Package Manager in the
System's Menu and install the meep-dev package. When you try to compile the
test.cpp in meep using the syntax `pkg-config --cflags meep`.........you
will get an error message saying some libraries are missing. You can install
all of these through the synaptic package manager. Look for the "dev"
packages of the missing stuff. Run the compilation again and it should work.
This is how I did this and it worked for me. You can not find these
developer packages int he Ubuntu's software centre.

Hope this helps
bwr,
Geeth

 [Meep-discuss] C++ Interface

Stefan Kapser
Mon, 17 Jan 2011 01:56:16 -0800

Hi,
I hope you can help me with this problem:

Currently I am just trying to compile the first test program from the Meep
C++ Tutorial, but can't really manage to do so.

I tryed the three ways given in se section Compiling:

1) make test.dac

gave me:

make: *** No rule to make target `test.dac'.  Stop.

2) g++ `pkg-config --cflags meep` test.cpp -o test `pkg-config --libs meep`

gave me:

Package meep was not found in the pkg-config search path.
Perhaps you should add the directory containing `meep.pc'
to the PKG_CONFIG_PATH environment variable
No package 'meep' found
Package meep was not found in the pkg-config search path.
Perhaps you should add the directory containing `meep.pc'
to the PKG_CONFIG_PATH environment variable
No package 'meep' found
test.cpp:1:20: error: meep.hpp: No such file or directory
test.cpp:2: error: ‘meep’ is not a namespace-name
test.cpp:2: error: expected namespace-name before ‘;’ token
test.cpp: In function ‘int main(int, char**)’:
test.cpp:5: error: ‘initialize’ was not declared in this scope
test.cpp:5: error: expected ‘;’ before ‘mpi’
test.cpp:7: error: ‘grid_volume’ was not declared in this scope
test.cpp:7: error: expected ‘;’ before ‘v’
test.cpp:8: error: ‘structure’ was not declared in this scope
test.cpp:8: error: expected ‘;’ before ‘s’
test.cpp:9: error: ‘fields’ was not declared in this scope
test.cpp:9: error: expected ‘;’ before ‘f’
test.cpp:11: error: ‘f’ was not declared in this scope
test.cpp:11: error: ‘Dielectric’ was not declared in this scope
test.cpp:11: error: ‘v’ was not declared in this scope
test.cpp:14: error: ‘gaussian_src_time’ was not declared in this scope
test.cpp:14: error: expected ‘;’ before ‘src’
test.cpp:15: error: ‘Ey’ was not declared in this scope
test.cpp:15: error: ‘src’ was not declared in this scope
test.cpp:15: error: ‘vec’ was not declared in this scope
test.cpp:20: error: ‘Hz’ was not declared in this scope
test.cpp: At global scope:
test.cpp:25: error: ISO C++ forbids declaration of ‘vec’ with no type
test.cpp:25: error: expected ‘,’ or ‘...’ before ‘&’ token
test.cpp: In function ‘double eps(int)’:
test.cpp:26: error: ‘p’ was not declared in this scope


So I guess the meep stuff is not in the past where my compiler is looking
for it. I installed Meep on Ubuntu via the Ubuntu Software Center and did
not get to pick anything during the installation.

I would be thankful for tipps how to make this work.
Thanks a lot!
Stefan
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to