libredwg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libredwg] Need help to create a new function...


From: Anderson Cardoso
Subject: Re: [libredwg] Need help to create a new function...
Date: Sun, 3 Apr 2011 14:40:39 -0300

you are linking with libredwg??
like this: $ gcc <yourfile.c> -o <yourfile> -lredwg

2011/4/3 guruprasad rane <address@hidden>
Hi All

I am very new to C programming. Just few days back I started with C. I am trying to create a basic dwg reading function. But I am stuck. I am using testSVG.c for reference.

I created a file testGuru.c in "examples" folder.

Here is the code

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
#include <dwg.h>
#include "../src/bits.h"
#include "suffix.c"

int
testdwg(char *filename);

int main(int argc, char *argv[])
{
    REQUIRE_INPUT_FILE_ARG (argc);
    return testdwg(argv[1]);
}

int
testdwg(char *filename)
{
    int error;
    Dwg_Data dwg;
    error = dwg_read_file(filename, &dwg);
    return error ? 1 : 0;
}

When I compile this code using gcc it outputs ---- undefined reference to "dwg_read_file"





--
Anderson Pierre Cardoso
Computer Engineer - University of Sao Paulo

[gtalk]: address@hidden
[blog]:  http://anderson-hacklife.blogspot.com/


"FreeSoftware -> free as in freedom"
  |  mande-me documentos em formatos livres (ODF) -> http://www.infowester.com/odf.php


reply via email to

[Prev in Thread] Current Thread [Next in Thread]