03-27-2013
Quote:
Originally Posted by
royalibrahim
Why I have to allocate a memory for i (declaring an int i) in the global scope in file2.c to get rid of this problem?
You're lying to the compiler by telling the compiler it exists (extern int i) but not actually
instantiating it anywhere. The extern just tells it to look for it somewhere else, but you must instantiate it in one and only one file.
10 More Discussions You Might Find Interesting
1. Programming
Hi
I'm getting
ld: fatal: option -h and building a dynamic executable are incompatible
ld: fatal: Flags processing errors
When I run
ld -shared -L/usr/dt/lib -lDtSvc -o builtin.so Workspace.o
after running
gcc -fPIC -I/usr/X11R6/include -I/usr/dt/include -c Workspace.c
I'm... (6 Replies)
Discussion started by: laho
6 Replies
2. UNIX for Dummies Questions & Answers
Getting the following error ,
ld: /opt/syncsort39/lib/libsyncsort.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link.
Is there any difference in the ld options in opt file while linking a 64 bit shared library ? Or is the problem because we are trying to link both 32 bit and 64... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies
3. Shell Programming and Scripting
Hi,
I got a script which sends the Email to the user based on certain variables received from Tivoli Server Monitoring 6.1.
Now to keep track of the mails I have wrote a stored procedure in DB2 as we use DB2 UDB as back end which take the variables that were used to send the mail and store it... (3 Replies)
Discussion started by: tcskurra
3 Replies
4. Programming
Hello,
we are a group of students (mechanical engineering) who are trying to port UNIX-software to a PC Linux system during a study project. The first goals were achieved: compiling the Fortran code and creating object files. However, we encounter errors during the linking process.
This is... (0 Replies)
Discussion started by: Dynamo
0 Replies
5. Programming
Hello. This shouldn't be an unusual problem, but I cannot find anything about it at google or at other search machine.
So, I've made an application using C++ and QtCreator. I 've made a new mime type for application's project files.
My system (ubuntu 10.10), when I right click a file and I... (3 Replies)
Discussion started by: hakermania
3 Replies
6. Programming
gcc -g -o MY_ELF test1.c test2.c -lm
I get this error multiple times...
/tmp/cc5TzMPo.o:(.data+0x0): multiple definition of 'XYZ' (1 Reply)
Discussion started by: dragonpoint
1 Replies
7. Programming
I have a C binary file(.so as extension) which is delivered by a product.
How do i use this functionalities of this .so file in my C program?
How can in link the .so to my C program? (1 Reply)
Discussion started by: vkca
1 Replies
8. UNIX for Advanced & Expert Users
Hi,
We have installed linux6(RHEL) OS and installed datastage application on that.
First time installation worked fine and our all services related to datastage was up and running.
When we stopped the datastage and restarted its giving below error while restart:-
./uv -admin -start
... (0 Replies)
Discussion started by: prasson_ibm
0 Replies
9. Programming
I am on a FreeBSD system trying to build a piece of software that I wrote. I had built it in the past but recently reinstalled FreeBSD. I am not sure what is going on. The software depends on and wxgtk2.8.
Using g++:
$ make
g++ -c `wx-config --cxxflags`... (9 Replies)
Discussion started by: AntumDeluge
9 Replies
10. Linux
Hi,
Currently I am migrating codes from unix to Linux. When doing linking(ld) getting the below error.
Error is :ld: invalid BFD target `--shared'
Providing the script of the ld:
ld -b -G -o lib/libatk.so ./src/atk_db.o ./src/atk_gcl.o ./src/atk_options.o ./src/atk_exception.o... (1 Reply)
Discussion started by: jrkar
1 Replies
LIBGVC(3) Library Functions Manual LIBGVC(3)
NAME
libgvc - Graphviz context library
SYNOPSIS
#include <graphviz/gvc.h>
/* set up a graphviz context */
extern GVC_t *gvNEWcontext(char **info, char *user);
extern char *gvUsername(void);
/* set up a graphviz context - alternative */
/* (wraps the above two functions using info built into libgvc) */
extern GVC_t *gvContext(void);
/* parse command line args - minimally argv[0] sets layout engine */
extern int gvParseArgs(GVC_t *gvc, int argc, char **argv);
extern graph_t *gvNextInputGraph(GVC_t *gvc);
/* Compute a layout using a specified engine */
extern int gvLayout(GVC_t *gvc, graph_t *g, char *engine);
/* Compute a layout using layout engine from command line args */
extern int gvLayoutJobs(GVC_t *gvc, graph_t *g);
/* Render layout into string attributes of the graph */
extern void attach_attrs(graph_t *g);
/* Parse an html string */
extern char *agstrdup_html(char *s);
extern int aghtmlstr(char *s);
/* Render layout in a specified format to an open FILE */
extern int gvRender(GVC_t *gvc, graph_t *g, char *format, FILE *out);
/* Render layout in a specified format to an open FILE */
extern int gvRenderFilename(GVC_t *gvc, graph_t *g, char *format, char *filename);
/* Render layout according to -T and -o options found by gvParseArgs */
extern int gvRenderJobs(GVC_t *gvc, graph_t *g);
/* Clean up layout data structures - layouts are not nestable (yet) */
extern int gvFreeLayout(GVC_t *gvc, graph_t *g);
/* Clean up graphviz context */
extern int gvFreeContext(GVC_t *gvc);
DESCRIPTION
libgvc provides a context for applications wishing to manipulate and render graphs. It provides a command line parsing, common rendering
code, and a plugin mechanism for renderers.
SEE ALSO
dot(1), neato(1), libcdt(3) libgraph(3)
AUTHOR
John Ellson (ellson@research.att.com), AT&T
LIBGVC(3)