In a program, I am using LEDA's basic data structure and it is working fine. But, after including the header files of C-Lapack, I am getting errors related to LEDA's .h files. Can it be possible that both are not compatible or may be I am doing something wrong? Has anyone used both LEDA and C-LAPACK in a project?

Thanks!

Note: Header files of C-Lapack are called by using extern "C".

asked 11 Dec '11, 00:53

MBansal's gravatar image

MBansal
2113
accept rate: 0%

retagged 14 Dec '11, 07:34

fbahr's gravatar image

fbahr ♦
4.6k716


would you perhaps like to post the error message?

link

answered 11 Dec '11, 13:39

ShahinG's gravatar image

ShahinG
281213
accept rate: 0%

Did you set the preprocessor "LEDA_DLL" and use namespace leda?

link

answered 13 Dec '11, 20:54

ShahinG's gravatar image

ShahinG
281213
accept rate: 0%

Thanks for the response.

Yes, I used namespace leda, and regarding LEDA_DLL, since I coded the program in Ubuntu so don't know about setting preprocessor in it.

(14 Dec '11, 00:39) MBansal

Hi, I am getting the following errors after including C-Lapack libraries: (FYI: rdp.cpp is my main file)

In file included from ./leda/incl/LEDA/core/impl/avl_tree.h:32:0,

             from ./leda/incl/LEDA/core/set.h:30,
             from rdp.cpp:15:

./leda/incl/LEDA/core/impl/bin_tree.h:204:22: error: macro "min" requires 2 arguments, but only 1 given

./leda/incl/LEDA/core/impl/bin_tree.h:205:22: error: macro "max" requires 2 arguments, but only 1 given

./leda/incl/LEDA/core/impl/bin_tree.h:207:65: error: macro "min" requires 2 arguments, but only 1 given

./leda/incl/LEDA/core/impl/bin_tree.h:208:65: error: macro "max" requires 2 arguments, but only 1 given

In file included from ./leda/incl/LEDA/graph/graph_objects0.h:17:0,

             from ./leda/incl/LEDA/graph/graph_objects.h:25,
             from ./leda/incl/LEDA/graph/graph.h:41,
             from rdp.cpp:19:

./leda/incl/LEDA/core/impl/olist.h:112:26: error: macro "max" requires 2 arguments, but only 1 given

./leda/incl/LEDA/core/impl/olist.h:113:26: error: macro "min" requires 2 arguments, but only 1 given

In file included from ./leda/incl/LEDA/core/impl/avl_tree.h:32:0,

             from ./leda/incl/LEDA/core/set.h:30,
             from rdp.cpp:15:

./leda/incl/LEDA/core/impl/bin_tree.h: At global scope:

./leda/incl/LEDA/core/impl/bin_tree.h:204:24: error: expected ‘;’ before ‘const’

./leda/incl/LEDA/core/impl/bin_tree.h:205:3: error: expected ‘;’ before ‘bin_tree_node’

./leda/incl/LEDA/core/impl/bin_tree.h:205:24: error: expected ‘;’ before ‘const’

./leda/incl/LEDA/core/impl/bin_tree.h:207:3: error: expected ‘;’ before ‘bin_tree_node’

./leda/incl/LEDA/core/impl/bin_tree.h: In member function ‘leda::bin_tree_node* leda::bin_tree::first_item() const’:

./leda/incl/LEDA/core/impl/bin_tree.h:207:61: error: cannot resolve overloaded function ‘min’ based on conversion to type ‘leda::bin_tree_node*’

./leda/incl/LEDA/core/impl/bin_tree.h: In member function ‘leda::bin_tree_node* leda::bin_tree::last_item() const’:

./leda/incl/LEDA/core/impl/bin_tree.h:208:61: error: cannot resolve overloaded function ‘max’ based on conversion to type ‘leda::bin_tree_node*’

In file included from rdp.cpp:16:0:

./leda/incl/LEDA/core/list.h: At global scope:

./leda/incl/LEDA/core/list.h:693:44: error: expected ‘;’ before ‘const’

./leda/incl/LEDA/core/list.h: In member function ‘void leda::list<e>::apply(void (*)(E&))’:

./leda/incl/LEDA/core/list.h:380:41: error: there are no arguments to ‘operator[]’ that depend on a template parameter, so a declaration of ‘operator[]’ must be available

./leda/incl/LEDA/core/list.h:380:41: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) In file included from rdp.cpp:16:0:

./leda/incl/LEDA/core/list.h: At global scope:

./leda/incl/LEDA/core/list.h:686:1: error: expected unqualified-id at end of input

./leda/incl/LEDA/core/list.h:686:1: error: expected ‘}’ at end of input

make: *** [rdp] Error 1

link

answered 13 Dec '11, 20:38

MBansal's gravatar image

MBansal
2113
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×4
×2
×1

Asked: 11 Dec '11, 00:53

Seen: 1,323 times

Last updated: 14 Dec '11, 07:34

OR-Exchange! Your site for questions, answers, and announcements about operations research.