Hi,
I have a Tab-based iPhone Application. One tab is a UITableView + DetailView, the second is a MKMapView. In the MapView I have Callouts with buttons. Those buttons, I want to link to its DetailView at the first tab. How can I do that? The Detail View has its own Controller and xib file. My MKMapView Annotation code is following:
-(...
I have a C++ project that due to its directory structure is set up as a static library A, which is linked into shared library B, which is linked into executable C. (This is a cross-platform project using CMake, so on Windows we get A.lib, B.dll, and C.exe, and on Linux we get libA.a, libB.so, and C.) Library A has an init function (A_i...
Anybody know of documentation on how to link libhoard as a static library in linux?
...
cpp.cpp
extern "C"
char* GetText()
{
return "Hello, world!";
}
delphi.dpr
{$APPTYPE CONSOLE}
{$LINK 'cpp.obj'}
function _GetText: PChar; cdecl; external;
begin
WriteLn(_GetText);
end.
I can't get this to work, no matter what I try. I tried various calling conventions, playing with underscores. even creating a .c wrapper for t...
I am frustrated. I have a simple doubt ..
I compile a simple program with gcc and if I see the section header using objdump, it does not show the section ".symtab". for the same a.out file, readelf shows the section. see the below snip -
[25] .symtab SYMTAB 00000000 000ca4 000480 10 26 2c 4
[26] .strta...
I have a static library A and a dynamic library B that links to A (on Linux A/libA.a and B/libB.so, on Windows A/A.lib and B/B.dll). On Linux I can cause B to contain all the symbols in A by using this link line:
g++ -shared -o libB.so B_init.o ... -Wl,--whole-archive -L../A -lA -Wl,--no-whole-archive
How would I do the equivalent on...
I've done a complete clean uninstall of XCode and deleted the prefs and deleted complete /Developer folder and reinstalled XCode again.
I create a new Cocoa application, go over to Target, doing a "Get info" in the target and enable "C / C++ compiler version" to "LLVM compiler 1.0.2" and press Build.
I get:
ld: warning: directory '/us...
So I'm trying to learn C++ and I've gotten as far as using header files. They really make no sense to me. I've tried many combinations of this but nothing so far has worked:
Main.cpp:
#include "test.h"
int main() {
testClass Player1;
return 0;
}
test.h:
#ifndef TEST_H_INCLUDED
#define TEST_H_INCLUDED
class testClass {
...
I am using the CodeSorcery arm-eabi-gcc tool chain and I have a problem using ld separate from gcc
I can compile my simple program and link it, if I let gcc call the ld.
This works not problem
g++ test.cpp; # Works
This does not work because of missing symbols
g++ -c test.cpp
ld -o test crti.o crtbegin.o test.o crtend.o crtn.o -lg...
I've known that I should use -l option for liking objects using GCC.
that is gcc -o test test.c -L./ -lmy
But I found that "gcc -o test2 test.c libmy.so" is working, too.
When I use readelf for those two executable I can't find any difference.
Then why people use -l option for linking objects? Does it have any advantage?
...
I have a linker error I've reduced to a simple example.
The build output is:
debug/main.o: In function main':
C:\Users\Dani\Documents\Projects\Test1/main.cpp:5:
undefined reference tolog&
log::operator<< (char
const (&) [6])'
collect2: ld returned
1 exit status
It looks like the linker ignores the definition in log.cpp....
This warning:
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts
with use of other libs; use /NODEFAULTLIB:library
is a fairly common warning in Visual Studio> I'd like to understand the exact reason for it and the right way (if at all) to handle it.
This comes up in a debug build, compiled with \MDd. The project is linked to th...
How can I create global variables that are shared in C? If I put it in a header file, then the linker complains that the variables are already defined. Is the only way to declare the variable in one of my C files and to manually put in externs at the top of all the other C files that want to use it? That sounds not ideal.
...
Hello all.
I'm using VS2010 and in my solution one of my C++/CLI projects references the other. But it can only link correctly when the project being referenced is compiled as a Static Lib.
I read all over that in managed .NET languages, .EXEs, libs and .dlls are the same thing, with a single flag or something like that as difference. ...
We have custom state "Duplicate" and i am trying to enforce adding link to parent work item when user set this state (TFS 2010).
Thanks
...
It's not clear to me what linking options exist for the Boost.Thread 1.34.1 library. I'm on Ubuntu 8.04 and I've found that when using either boost_thread or boost_thread-mt during linking both compile and run, but I don't see any documentation on these or any other linking options in above link.
What Boost.Thread linking options are a...
Hey,
I want to write a program that outputs a list of libraries that I should link to given source code (or object) files (for C or C++ programs).
In *nix, there are useful tools such as sdl-config and llvm-config. But, I want my program to work on Windows, too.
Usage:
get-library-names -l /path/to/lib a.cpp b.cpp c.cpp d.obj
Then...
I'm trying to compile svg2pdf on centos. I think I've managed to get the required dependencies installed using yum:
sudo yum install librsvg2
sudo yum install cairo
The Makefile contains:
MYCFLAGS=`pkg-config --cflags librsvg-2.0 cairo-pdf` -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -
Wneste...
Hi,
I was trying to write a small debug utility and for this I need to get the function/global variable address given its name. This is built-in debug utility, which means that the debug utility will run from within the code to be debugged or in plain words I cannot parse the executable file.
Now is there a well-known way to do that ? ...
I'm in linker paradise now. I have a C library which only compiles in Visual C++ (it probably works in gcc) if:
I compile it as C++ code
Define __cplusplus which results in all the declarations being enclosed in extern "C" { }
So, by doing this I have a static library called, say, bsbs.lib
Now, I have a C++ project called Tester whi...