Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8230617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:11:39+00:00 2026-06-07T17:11:39+00:00

problem is either way linking or including …. the library libircclient.h is been found

  • 0

problem is either way linking or including …. the library libircclient.h is been found but the functions which are used in the library not….

#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>

/*#include "./libircclient-1.6/include/libircclient.h"*/ 
#include "libircclient.h"

typedef struct
{
    char    * channel;
    char    * nick;

} irc_ctx_t;


void addlog (const char * fmt, ...)
{
    FILE * fp;   // File-Zeiger
    char buf[1024];
    va_list va_alist; 

    va_start (va_alist, fmt); 
#if defined (WIN32)
    _vsnprintf (buf, sizeof(buf), fmt, va_alist);  
#else                                                         
    vsnprintf (buf, sizeof(buf), fmt, va_alist); 
#endif
    va_end (va_alist); 

    printf ("%s\n", buf);

    if ( (fp = fopen ("irctest.log", "ab")) != 0 ) // High level, daher File-Zeiger
    {
        fprintf (fp, "%s\n", buf);
        fclose (fp);
    }
}


void dump_event (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count)
{
    char buf[512];
    int cnt;

    buf[0] = '\0';

    for ( cnt = 0; cnt < count; cnt++ )
    {
        if ( cnt )
            strcat (buf, "|");

        strcat (buf, params[cnt]);
    }


    addlog ("Event \"%s\", origin: \"%s\", params: %d [%s]", event, origin ? origin : "NULL", cnt, buf);
}


void event_join (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count)
{
    dump_event (session, event, origin, params, count);
    irc_cmd_user_mode (session, "+i");
    irc_cmd_msg (session, params[0], "Hi all");
}


void event_connect (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count)
{
    irc_ctx_t * ctx = (irc_ctx_t *) irc_get_ctx (session);
    dump_event (session, event, origin, params, count);

    irc_cmd_join (session, ctx->channel, 0);
}


void event_privmsg (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count)
{
    dump_event (session, event, origin, params, count);

    printf ("'%s' said me (%s): %s\n", 
        origin ? origin : "someone",
        params[0], params[1] );
}

....

gcc irctest.c

/tmp/ccbleNaD.o: In function `event_join’: irctest.c:(.text+0x2b9):

undefined reference to `irc_cmd_user_mode’ irctest.c:(.text+0x2d4):

undefined reference to `irc_cmd_msg’ /tmp/ccbleNaD.o: In function

`event_connect’: irctest.c:(.text+0x2fe): undefined reference to

`irc_get_ctx’ irctest.c:(.text+0x33b): undefined reference to

irc_cmd_join' /tmp/ccbleNaD.o: In functiondcc_recv_callback’:

irctest.c:(.text+0x43c): undefined reference to `irc_dcc_msg’

irctest.c:(.text+0x49b): undefined reference to `irc_dcc_msg’

irctest.c:(.text+0x4a7): undefined reference to `irc_strerror’ ….

collect2: ld gab 1 als Ende-Status zurück

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:11:41+00:00Added an answer on June 7, 2026 at 5:11 pm

    When you compile you have to link against the library. It is finding the function declarations but not able to link against the object files containing the definition.

    I think it would be something like:
    gcc -lircclient irctest.c

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm tempted to say this problem is with my general architecture but either way
I am either misunderstanding the docs or having a problem with the drop.time=TRUE parameter
Problem: I have a value in a database table. This value can either contain
Consider this problem: There's a square grid defined, each tile being either passable (1)
Problem: Been struggling to get my code to load external shaders and it is
Problem: I have a table that prints out vertical but I would like it
Note that the order can go either way (erase first then push back, just
Admittedly, this is a strange problem for me to have, but here is what
I have an application that I've been working on and found a troubling difference
Maybe I've been staring at this problem for too long, maybe there isn't an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.